<template>
    <div>
        <el-menu
                :default-active="spnActiveIndex"
                class="el-menu-vertical-demo"
                background-color="#204051"
                text-color="#fff"
                active-text-color="#ffd04b"
                router>
            <el-menu-item index="/back/staffNav">
                <i class="el-icon-s-custom"></i>
                <span slot="title">员工管理</span>
            </el-menu-item>
            <el-menu-item index="/back/cuisineNav">
                <i class="el-icon-menu"></i>
                <span slot="title">菜品管理</span>
            </el-menu-item>
            <el-menu-item index="/back/consumablNav">
                <i class="el-icon-s-claim"></i>
                <span slot="title">消耗品管理</span>
            </el-menu-item>
            <el-menu-item index="/back/operationNav">
                <i class="el-icon-s-shop"></i>
                <span slot="title">运营管理</span>
            </el-menu-item>
            <el-menu-item index="/back/moneyNav">
                <i class="el-icon-s-marketing"></i>
                <span slot="title">财务分析</span>
            </el-menu-item>
            <el-menu-item index="/back/systemNav">
                <i class="el-icon-s-tools"></i>
                <span slot="title">系统管理</span>
            </el-menu-item>

        </el-menu>
    </div>
</template>

<script>
    export default {
        name: "superAdminNav",
        computed: {
            spnActiveIndex: {
                get: function () {
                    // let arr = this.$route.path.split('/');
                    let path = this.$route.path;
                    switch (path) {
                        case '/back/staffInformation':
                            return '/back/staffNav';
                        case '/back/staffPositions':
                            return '/back/staffNav';
                        case '/back/staffPermissions':
                            return '/back/staffNav';
                        case '/back/foodsSet':
                            return '/back/cuisineNav';
                        case '/back/foodsType':
                            return '/back/cuisineNav';
                        case '/back/consumablesManagement':
                            return '/back/consumablNav'
                        case '/back/consumablesType':
                            return '/back/consumablNav'
                        case '/back/employeeScheduling':
                            return '/back/operationNav'
                        case '/back/restaurantBusiness':
                            return '/back/operationNav'
                        case '/back/restaurantTable':
                            return '/back/operationNav'
                        case '/back/restaurantMember':
                            return '/back/operationNav'
                        case '/back/FirstTable':
                            return '/back/moneyNav'
                        case '/back/SecondTable':
                            return '/back/moneyNav'
                        case '/back/costManagement':
                            return '/back/moneyNav'
                        case '/back/wageManagement':
                            return '/back/moneyNav'
                        case '/back/dataManipulation':
                            return '/back/systemNav'
                        case '/back/staffOperationLog':
                            return '/back/systemNav'
                    }

                },
                set: function () {

                }
            },
        },

        data() {
            return {
                // activeIndex:this.$route.path
            }
        },
        methods: {
        },
    };
</script>

<style scoped lang="less">
</style>